cmake_minimum_required(VERSION 3.11)
project(final_dolphindb)

set(CMAKE_CXX_STANDARD 11)

if (WIN32)
    set(platform_macro "-DWINDOWS")
elseif (UNIX)
    set(platform_macro "-DLINUX")
    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif ()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${platform_macro} -DLOGGING_LEVEL_2 -O2 -std=c++11 -Wall -rdynamic")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)

#add_library(dolphindb SHARED main.cpp)
add_executable(dolphindb main.cpp)
target_link_libraries(dolphindb DolphinDBAPI pthread ssl crypto)